#include <stdio.h>

int main() {
    int aa, bb, a, b, tmp;

    scanf("%d %d", &a, &b);
    aa = a;
    bb = b;
    while (b != 0) {
        tmp = a % b;
        a = b;
        b = tmp;
    }
    printf("Common Divisor:%d\n", a);
    printf("Common Multiple:%d\n", aa*bb/a);

    return 0;
}
